package com.xsq.newmall01.Dao;

import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
public class Order {
    private int id;
    private int senderid;
    private int receiverid;
    private int goodid;
    private String goodname;
    private int price;
    private Date createtime;//订单生成时间

    private String senderUsername;   // 对应sender_username
    private String receiverUsername; // 对应receiver_username


    public Order() {
    }

    public Order(int id, int senderid, int receiverid, int goodid, String goodname, int price, Date createtime  ) {
        this.id = id;
        this.senderid = senderid;
        this.receiverid = receiverid;
        this.goodid = goodid;
        this.goodname = goodname;
        this.price = price;
    }

    public Order(int id, int senderid, int receiverid, int goodid, String goodname, int price, Date createtime, String senderUsername, String receiverUsername) {
        this.id = id;
        this.senderid = senderid;
        this.receiverid = receiverid;
        this.goodid = goodid;
        this.goodname = goodname;
        this.price = price;
        this.createtime = createtime;
        this.senderUsername = senderUsername;
        this.receiverUsername = receiverUsername;
    }

    /**
     * 获取
     * @return id
     */
    public int getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * 获取
     * @return senderid
     */
    public int getSenderid() {
        return senderid;
    }

    /**
     * 设置
     * @param senderid
     */
    public void setSenderid(int senderid) {
        this.senderid = senderid;
    }

    /**
     * 获取
     * @return receiverid
     */
    public int getReceiverid() {
        return receiverid;
    }

    /**
     * 设置
     * @param receiverid
     */
    public void setReceiverid(int receiverid) {
        this.receiverid = receiverid;
    }

    /**
     * 获取
     * @return goodid
     */
    public int getGoodid() {
        return goodid;
    }

    /**
     * 设置
     * @param goodid
     */
    public void setGoodid(int goodid) {
        this.goodid = goodid;
    }

    /**
     * 获取
     * @return goodname
     */
    public String getGoodname() {
        return goodname;
    }

    /**
     * 设置
     * @param goodname
     */
    public void setGoodname(String goodname) {
        this.goodname = goodname;
    }

    /**
     * 获取
     * @return price
     */
    public int getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(int price) {
        this.price = price;
    }

    public String toString() {
        return "Order{id = " + id + ", senderid = " + senderid + ", receiverid = " + receiverid + ", goodid = " + goodid + ", goodname = " + goodname + ", price = " + price + "}";
    }

    /**
     * 获取
     * @return createtime
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * 设置
     * @param createtime
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * 获取
     * @return senderUsername
     */
    public String getSenderUsername() {
        return senderUsername;
    }

    /**
     * 设置
     * @param senderUsername
     */
    public void setSenderUsername(String senderUsername) {
        this.senderUsername = senderUsername;
    }

    /**
     * 获取
     * @return receiverUsername
     */
    public String getReceiverUsername() {
        return receiverUsername;
    }

    /**
     * 设置
     * @param receiverUsername
     */
    public void setReceiverUsername(String receiverUsername) {
        this.receiverUsername = receiverUsername;
    }
}
